aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/article/[slug].tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-15 22:45:57 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-15 22:51:30 +0100
commitaa1ca65e7c9807c6d6020e39166536297fe1cdae (patch)
tree2648da350fec3b71ab7f575d63e4c63ba08248b1 /src/pages/article/[slug].tsx
parent16dbb4742264edac82fa6bb8e461259d097f4437 (diff)
chore: update sidebar and widgets styles
I'm now using a widget that can be expanded/collapsed. It also allows me to handle more effectively widgets overflow and to avoid styles repetitions. However, with stylelint rule "no-descending-specificity", I'm not sure if the stylesheets are really logical... Maybe I should deactivate this rule.
Diffstat (limited to 'src/pages/article/[slug].tsx')
-rw-r--r--src/pages/article/[slug].tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx
index fb79b41..509be4f 100644
--- a/src/pages/article/[slug].tsx
+++ b/src/pages/article/[slug].tsx
@@ -3,7 +3,6 @@ import CommentsList from '@components/CommentsList/CommentsList';
import { getLayout } from '@components/Layouts/Layout';
import PostFooter from '@components/PostFooter/PostFooter';
import PostHeader from '@components/PostHeader/PostHeader';
-import ToC from '@components/ToC/ToC';
import { config } from '@config/website';
import { getAllPostsSlug, getPostBySlug } from '@services/graphql/queries';
import { NextPageWithLayout } from '@ts/types/app';
@@ -17,7 +16,7 @@ import Prism from 'prismjs';
import { ParsedUrlQuery } from 'querystring';
import { useEffect } from 'react';
import styles from '@styles/pages/Page.module.scss';
-import { Sharing } from '@components/Widget';
+import { Sharing, ToC } from '@components/Widgets';
import Sidebar from '@components/Sidebar/Sidebar';
const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => {
@@ -60,15 +59,15 @@ const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => {
</Head>
<article className={styles.article}>
<PostHeader intro={intro} meta={meta} title={title} />
- <aside className={styles.toc}>
+ <Sidebar position="left">
<ToC />
- </aside>
+ </Sidebar>
<div
className={styles.body}
dangerouslySetInnerHTML={{ __html: content }}
></div>
<PostFooter subjects={subjects} />
- <Sidebar>
+ <Sidebar position="right">
<Sharing title={title} excerpt={intro} />
</Sidebar>
<section className={styles.comments}>